Skip to content

feat: Detect cross-section relative links in link validator#1085

Merged
louis-pre merged 1 commit into
mainfrom
add-cross-section-link-check
Apr 22, 2026
Merged

feat: Detect cross-section relative links in link validator#1085
louis-pre merged 1 commit into
mainfrom
add-cross-section-link-check

Conversation

@louis-pre

Copy link
Copy Markdown
Member

Summary

  • Add cross-section boundary check to the link validator
  • Relative links between site sections (e.g., Guides -> API Reference) must be absolute URLs since GitBook can't resolve them across sections

How it works

After verifying a relative link target exists, the validator checks whether the source and target files belong to different site sections (using the siteSections config). If they do, it flags the link.

Test plan

  • Verify validator catches ../../api-reference/... links from guides
  • Verify validator allows relative links within the same section

🤖 Generated with Claude Code

Relative links between site sections (e.g., from Guides to API
Reference) don't work in GitBook — they must be absolute URLs.
The validator now flags these.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@louis-pre louis-pre requested a review from a team as a code owner April 22, 2026 02:16
@louis-pre louis-pre merged commit a8e3144 into main Apr 22, 2026
9 checks passed
@louis-pre louis-pre deleted the add-cross-section-link-check branch April 22, 2026 02:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant